import { createApp } from "vue";
import "./style.css";
import App from "./App.vue";
import router from "./router";
import { createPinia } from "pinia";
import piniaPluginPersistedstate from "pinia-plugin-persistedstate";
import i18n from "./lang";
import "@imengyu/vue3-context-menu/lib/vue3-context-menu.css";
import ContextMenu from "@imengyu/vue3-context-menu";
import "virtual:svg-icons-register";
import svgIcon from "./components/svg/index.vue";
import mapboxgl from "mapbox-gl";
//@ts-ignore
mapboxgl.setRTLTextPlugin(
  "https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.2.3/mapbox-gl-rtl-text.js"
);
const pinia = createPinia();
pinia.use(piniaPluginPersistedstate);
createApp(App)
  .use(i18n)
  .use(ContextMenu)
  .use(router)
  .use(pinia)
  .component("svg-icon", svgIcon)
  .mount("#app");
